home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1044 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.9 KB

  1. Path: herold.franken.de!jhd
  2. Date: 08 Jan 1996 19:06:00 +0100
  3. From: jhd@herold.franken.de (Joachim Durchholz)
  4. Newsgroups: comp.lang.eiffel,comp.edu,comp.lang.ada,comp.lang.c,comp.lang.c++,comp.lang.modula2,comp.lang.modula3
  5. Message-ID: <60SqRIQF3RB@herold.franken.de>
  6. References: <30C40F77.53B5@swsbbs.com> <4cd8fc$oud@news.manawatu.gen.nz>
  7.     <HtlknJAZAQ7wEwjl@wndrwrks.demon.co.uk> <60KgWmb-3RB@herold.franken.de>
  8.     <30EF0415.6FE1@tus.ssi1.com>
  9. Subject: Re: Hungarian notation
  10. X-Newsreader: XP v3.02
  11. MIME-Version: 1.0
  12. Content-Type: text/plain; charset=ISO-8859-1
  13. Content-Transfer-Encoding: 8bit
  14.  
  15. Mike.Palmer@tus.ssi1.com wrote 06.01.96 on Re: Hungarian notation:
  16.  
  17. > Joachim Durchholz wrote:
  18. > >
  19. > > > Consider also that variable names may be misleading anyway. In that
  20. > > > sense there's no great difference between
  21. > > >
  22. > > >         someProc(MyString)
  23. > > >
  24. > > > and
  25. > > >
  26. > > >         someProc(pszMyString)
  27. > > >
  28. > > > either could quite happily refer to any other data type.
  29. > > >
  30. > >
  31. > > This example does not occur in real life. Or rather, it better should not!
  32. > > Anybody using meaningless names like "MyString" should be thrown out of
  33. > > the programming business. Depending on the actual semantics of "someProc",
  34. > > the parameter should be called "Message" or "Options" or "ParserInput" or
  35. > > whatever.
  36. > >
  37. > > -Joachim
  38. >
  39. > One hopes you just missed the point here. Hungarian notation does not
  40. > attempt to help you keep track of _what_ your variable is, it gives you a
  41. > framework to keep track of what _kind_ of variable it is. One would also
  42. > note that someProc is not a very descriptive name, but so what? In the first
  43. > example, I have _no_ clue what type of variable MyString is, although I
  44. > could probably deduce that it is a string. In the second example, the  
  45. prefix
  46. That's exactly what I meant. Sorry that I didn't make my point clear.
  47. > tells me that it is a Pointer to a Zero terminated String.
  48.  
  49.  
  50. -Joachim
  51.  
  52. --
  53. Im speaking for myself here.
  54. ## CrossPoint v3.02 ##
  55.